package cn.yunyichina.provider.iface.entity.hisiface.examination;

import java.io.Serializable;
import java.text.ParseException;
import java.text.SimpleDateFormat;

/**
 * 检查结果列表查询出参
 * 
 * @author zhou
 *
 */
public class ExamineListVoResponse implements Comparable<Object>,Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 8336085498399897913L;
	
	private String checkId;
	private String checkName;
	private String checkType;
	private String checkTypeName;
	private String deptName;
	private String doctorName;
	private String checkTime;
	private String orderDoctor;
	private String orderDoctorCode;
	private String orderDept;
	private String reportTime;
	private String fileAddress;

	/*
	 * 日清单明细
	 */
	private ExamineDetailVoResponse examineDetail;
	
	public String getCheckId() {
		return checkId;
	}

	public void setCheckId(String checkId) {
		this.checkId = checkId;
	}

	public String getCheckName() {
		return checkName;
	}

	public void setCheckName(String checkName) {
		this.checkName = checkName;
	}

	public String getCheckType() {
		return checkType;
	}

	public void setCheckType(String checkType) {
		this.checkType = checkType;
	}

	public String getCheckTypeName() {
		return checkTypeName;
	}

	public void setCheckTypeName(String checkTypeName) {
		this.checkTypeName = checkTypeName;
	}

	public String getDeptName() {
		return deptName;
	}

	public void setDeptName(String deptName) {
		this.deptName = deptName;
	}

	public String getDoctorName() {
		return doctorName;
	}

	public void setDoctorName(String doctorName) {
		this.doctorName = doctorName;
	}

	public String getCheckTime() {
		return checkTime;
	}

	public void setCheckTime(String checkTime) {
		this.checkTime = checkTime;
	}

	public String getOrderDoctor() {
		return orderDoctor;
	}

	public void setOrderDoctor(String orderDoctor) {
		this.orderDoctor = orderDoctor;
	}

	public String getOrderDoctorCode() {
		return orderDoctorCode;
	}

	public void setOrderDoctorCode(String orderDoctorCode) {
		this.orderDoctorCode = orderDoctorCode;
	}

	public String getOrderDept() {
		return orderDept;
	}

	public void setOrderDept(String orderDept) {
		this.orderDept = orderDept;
	}

	public String getReportTime() {
		return reportTime;
	}

	public void setReportTime(String reportTime) {
		this.reportTime = reportTime;
	}

	public String getFileAddress() {
		return fileAddress;
	}

	public void setFileAddress(String fileAddress) {
		this.fileAddress = fileAddress;
	}

	public ExamineDetailVoResponse getExamineDetail() {
		return examineDetail;
	}

	public void setExamineDetail(ExamineDetailVoResponse examineDetail) {
		this.examineDetail = examineDetail;
	}
	
	@Override
	public int compareTo(Object o) {
		try{
			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
			if (this == o) {
				return 0;
			} else if (o != null && o instanceof ExamineListVoResponse) {
				ExamineListVoResponse u = (ExamineListVoResponse) o;
				if (sdf.parse(u.getReportTime()).getTime() < sdf.parse(this.reportTime).getTime()) //根据date进行排序
					return -1;
				else if (sdf.parse(u.getReportTime()).getTime() == sdf.parse(this.reportTime).getTime())
					return -1;
				else
					return 1;	
			} else {
				return -1;
			}
		
		}catch(ParseException e){
			
		}
		return -1;
	}
}
